5 + 8 = 13
Month | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
Female Rabbits | 1 | 1 | 2 | 3 | 5 | 8 | 13 |
Here is what we have been doing:
rabbits for Month( N ) = rabbits from previous month + rabbits Born During Month( N ) rabbits for Month( N ) = rabbits from previous month + mature Rabbits During Month( N ) rabbits for Month( N ) = rabbits for Month( N-1 ) + rabbits for Month( N-2 )
Using this rule, to calculate the number of rabbits for any month just add up the numbers for the previous two months.
What is the value for the end of month 8?